﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using Bussiness;

namespace EWebsite.Admin.Carriers {
    public partial class RoutePrice : System.Web.UI.Page {
        protected DataTable _categoriesTable;

        protected void Page_Load(object sender, EventArgs e) {
            if (!IsPostBack) {
                _DataBind();
            }
        }

        protected void _DataBind() {
            ProductBuss bussiness = new ProductBuss();
            grvProducts.DataSource = bussiness.getProducts();
            grvProducts.DataBind();

            //CategoryBuss buss = new CategoryBuss();
            //_categoriesTable = buss.getCategories();
        }

        protected void grvProducts_PageIndexChanging(object sender, GridViewPageEventArgs e) {
            grvProducts.PageIndex = e.NewPageIndex;

            _DataBind();
        }
        
        protected void grvProducts_RowCommand(object sender, GridViewCommandEventArgs e) {

        }
    }
}